import sys

from PySide2.QtCore import Qt
from PySide2.QtWidgets import QApplication, QMainWindow, QVBoxLayout, QWidget

from color_widget import ColorWidget


class MainWindow(QMainWindow):
    def __init__(self):
        super().__init__()
        
        self.setWindowTitle("VBoxLayout Sample")
        self.setFixedSize(600, 300)

        layout = QVBoxLayout()
        layout.addWidget(ColorWidget("red"))
        layout.addWidget(ColorWidget("green"))
        layout.addWidget(ColorWidget("blue"))
        
        widget = QWidget()
        widget.setLayout(layout)
        self.setCentralWidget(widget)


app = QApplication(sys.argv)
window = MainWindow()
window.show()
app.exec_()
